package com.atguigu.入门题;

import java.util.Iterator;
import java.util.Scanner;
import java.util.TreeSet;

public class HJ3明明的随机数 {
//    public static void main(String[] args) {
//        Scanner scanner = new Scanner(System.in);
//        while (scanner.hasNext()) {
//            int num = scanner.nextInt();
//            int[] arr = new int[1001];
//            for (int i = 0; i < num; i++) {
//                int n = scanner.nextInt();
//                arr[n] = 1;
//            }
//            for (int i = 1; i < arr.length; i++) {
//                if (arr[i] == 1) {
//                    System.out.println(i);
//                }
//            }
//        }
//    }


    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        //获取个数
        int num = sc.nextInt();
        //创建TreeSet进行去重排序
        TreeSet set = new TreeSet();
        //输入
        for (int i = 0; i < num; i++) {
            set.add(sc.nextInt());
        }

        //输出
        Iterator iterator = set.iterator();
        while (iterator.hasNext()) {
            System.out.println(iterator.next());
        }
    }


}
